package com.jihu.design.behavioral.memento;

/**
 * @author jihu
 * @date 2021/10/8
 */
public class MainTest {

    public static void main(String[] args) throws Exception {
        LeiGamer leiGamer = new LeiGamer();

        leiGamer.playGame();

        leiGamer.saveGameRecord();

        leiGamer.playGame();

        leiGamer.playGame();

        leiGamer.saveGameRecord();


        LeiGamer fromMemento = leiGamer.getFromMemento(1);
        fromMemento.playGame();


    }
}
